package com.smart.campus.controller;

import com.smart.campus.dto.AttendanceStatistics;
import com.smart.campus.dto.TeacherAttendance;
import com.smart.campus.interfaces.TeacherAttendanceServiceApi;
import com.smart.campus.pojo.PagedResponse;
import com.smart.campus.service.TeacherAttendanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @BelongsProject: smart-campus
 * @BelongsPackage: com.smart.campus.controller
 * @Author: JinBao shan
 * @date 2024/10/7 20:07
 * @Description: TODO
 * @Version: 1.0
 */

@RestController
public class TeacherAttendanceController implements TeacherAttendanceServiceApi {
    @Autowired
    private TeacherAttendanceService attendanceService;

    @Override
    public PagedResponse<TeacherAttendance> findTeacherAttendancePagination(TeacherAttendance attendance, Integer pageNum, Integer pageSize) {
        return attendanceService.findTeacherAttendancePagination(attendance,pageNum,pageSize);
    }

    @Override
    public void addTeacherAttendance(TeacherAttendance attendance) {
        attendanceService.addTeacherAttendance(attendance);
    }

    @Override
    public TeacherAttendance getTeacherAttendanceById(Integer id) {
        return attendanceService.getTeacherAttendanceById(id);
    }

    @Override
    public void updateTeacherAttendance(TeacherAttendance attendance) {
        attendanceService.updateTeacherAttendance(attendance);
    }

    @Override
    public void delTeacherAttendanceById(Integer id) {
        attendanceService.delTeacherAttendanceById(id);
    }

    @Override
    public List<AttendanceStatistics> queryAttendanceStatistics(AttendanceStatistics attendanceStatistics) {
        return attendanceService.queryAttendanceStatistics(attendanceStatistics);
    }
}
